< previous page page_19 next page >

Page 19
      curidx = curidx + 1
      PointArray(curidx).X = Width
      PointArray(curidx).Y = Height - curidx * Increment
      curidx = curidx + 1
      PointArray(curidx).X = 0
      PointArray(curidx).Y = curidx * Increment
   Loop While curidx * Increment < Height

End Sub

Private Sub Form_Paint()
   Dim points() As POINTAPI
   LoadPointArray Width, Height, 5, points()
   Call Polygon(hWnd, points(0), UBound(points) + 1)
End Sub

Private Sub Form_Resize()
   Refresh
End Sub
0019-01.gif
Figure P3-1:
Correct display for the Poly program
Results
The code shown above displays an empty form.
Can you make it work? It may be trickier than it looks.

 
< previous page page_19 next page >